package com.toune.villager.bean;

import com.chad.library.adapter.base.entity.MultiItemEntity;

import java.util.List;

public class MyInfoBean {

    /**
     * total : 17
     * per_page : 15
     * current_page : 1
     * last_page : 2
     * data : [{"id":25,"is_read":1,"title":"测试【赣QQQQQQ】结算成功","content":"","type":8,"push_time":"2019-04-16 17:24:47"},{"id":24,"is_read":1,"title":"您在2019-04-16 17:24结算成功","content":"","type":7,"push_time":"2019-04-16 17:24:47"},{"id":23,"is_read":1,"title":"测试【赣QQQQQQ】装料完成","content":"","type":8,"push_time":"2019-04-16 17:24:39"},{"id":22,"is_read":1,"title":"您在2019-04-16 17:24装料完成","content":"","type":7,"push_time":"2019-04-16 17:24:39"},{"id":18,"is_read":1,"title":"您在2019-04-16 17:24装料完成","content":"","type":7,"push_time":"2019-04-16 17:24:31"},{"id":21,"is_read":1,"title":"测试【赣QQQQQQ】装料完成","content":"","type":8,"push_time":"2019-04-16 17:24:31"},{"id":20,"is_read":1,"title":"您在2019-04-16 17:24装料完成","content":"","type":7,"push_time":"2019-04-16 17:24:31"},{"id":19,"is_read":1,"title":"测试【赣QQQQQQ】装料完成","content":"","type":8,"push_time":"2019-04-16 17:24:31"},{"id":17,"is_read":1,"title":"测试【赣QQQQQQ】开始装料","content":"","type":6,"push_time":"2019-04-16 17:24:21"},{"id":16,"is_read":1,"title":"您在2019-04-16 17:24开始装料","content":"","type":5,"push_time":"2019-04-16 17:24:21"},{"id":15,"is_read":1,"title":"测试【赣QQQQQQ】开始装料","content":"","type":6,"push_time":"2019-04-16 17:24:20"},{"id":14,"is_read":1,"title":"您在2019-04-16 17:24开始装料","content":"","type":5,"push_time":"2019-04-16 17:24:20"},{"id":12,"is_read":1,"title":"您于2019-04-16 17:23 入场登记成功","content":"","type":4,"push_time":"2019-04-16 17:23:26"},{"id":13,"is_read":1,"title":"测试 赣QQQQQQ在2019-04-16 17:23 入场登记成功","content":"","type":5,"push_time":"2019-04-16 17:23:26"},{"id":11,"is_read":1,"title":"您于2019-04-16 17:21 创建订单成功","content":"{\"plate_number\":\"\\u95fdRRRRRR\",\"factory_name\":\"\\u65b0\\u589e\\u6599\\u573a\",\"stone_name\":\"\\u6d4b\\u8bd5\",\"num\":10,\"price\":\"1.00\"}","type":1,"push_time":"2019-04-16 17:21:16"}]
     */

    private int total;
    private String per_page;
    private int current_page;
    private int last_page;
    private List<DataBean> data;

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public String getPer_page() {
        return per_page;
    }

    public void setPer_page(String per_page) {
        this.per_page = per_page;
    }

    public int getCurrent_page() {
        return current_page;
    }

    public void setCurrent_page(int current_page) {
        this.current_page = current_page;
    }

    public int getLast_page() {
        return last_page;
    }

    public void setLast_page(int last_page) {
        this.last_page = last_page;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean implements MultiItemEntity {
        /**
         * id : 25
         * is_read : 1
         * title : 测试【赣QQQQQQ】结算成功
         * content :
         * type : 8
         * push_time : 2019-04-16 17:24:47
         */

        private int id;
        private int is_read;
        private String title;
        private String content;
        private int type;
        private String push_time;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public int getIs_read() {
            return is_read;
        }

        public void setIs_read(int is_read) {
            this.is_read = is_read;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public String getPush_time() {
            return push_time;
        }

        public void setPush_time(String push_time) {
            this.push_time = push_time;
        }

        public static final int TYPE1 = 1;
        public static final int TYPE2 = 2;
        public static final int TYPE3 = 3;
        public static final int TYPE4 = 4;
        public static final int TYPE5 = 5;
        public static final int TYPE6 = 6;
        public static final int TYPE7 = 7;
        public static final int TYPE8 = 8;

        @Override
        public int getItemType() {
            int t = TYPE1;
            switch (type) {
                case 1:
                    t = TYPE1;
                    break;
                case 2:
                case 3:
                case 4:
                case 5:
                case 6:
                case 7:
                default:
                    t = TYPE2;
                    break;
            }
            return t;
        }
    }
}
